From 209e8b54e97cd431225eb171b301a913b42a1bb4 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 1 Oct 2019 16:19:12 +0100 Subject: [PATCH] docs: Add a section on supported build types GTK uses the Meson `buildtype` option to determine whether to enable or disable debugging code and safeties. We should document our behaviour and expectations. --- docs/reference/gtk/building.sgml | 55 ++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/docs/reference/gtk/building.sgml b/docs/reference/gtk/building.sgml index 86d059fe90..21c3f5ecd0 100644 --- a/docs/reference/gtk/building.sgml +++ b/docs/reference/gtk/building.sgml @@ -106,6 +106,61 @@ How to compile GTK itself export LD_LIBRARY_PATH PATH + + + Build types + + Meson has different build types, exposed by the buildtype + configuration option. GTK enables and disables functionality depending on + the build type used when calling meson to + configure the build. + + + <systemitem>debug</systemitem> and <systemitem>debugoptimized</systemitem> + + + GTK will enable debugging code paths in both the + debug and debugoptimized + build types. Builds with buildtype set + to debug will additionally enable + consistency checks on the internal state of the toolkit. + + + + It is recommended to use the debug or + debugoptimized build types when developing + GTK itself. Additionally, debug builds of + GTK are recommended for profiling and debugging GTK applications, + as they include additional validation of the internal state. + + + + The debugoptimized build type is the + default for GTK if no build type is specified when calling + meson + + + + + <systemitem>release</systemitem> + + + The release build type will disable + debugging code paths and additional run time safeties, like + checked casts for object instances. + + + + + The plain build type provided by Meson + should only be used when packaging GTK, and it's expected + that packagers will provide their own compiler flags when + building GTK. See the previous section for the list of + environment variables to be used to define compiler and + linker flags. + + + Dependencies -- 2.30.2